package algorithmcase;

import java.util.Arrays;

public class Case5 {
    //选择排序
    public static void main(String[] args) {
        int[] arr = {27,22,30,40,36,13,19,16,20,7,10,43,50,58};
        for (int j = 0; j < arr.length-1; j++){
            for(int i=j+1;i<arr.length-1;i++){
                if(arr[j] > arr[i]){
                    int temp = arr[j];
                    arr[j] = arr[i];
                    arr[i] = temp;
                }
            }
        }
        System.out.println(Arrays.toString(arr));
    }
}
